<template>
  <div class="home">
    <el-container>
      <el-header class="layout-header" style="background-color:seagreen "><h1 style="color:#fff;line-height: 60px">
        宝格丽酒店后台管理系统</h1></el-header>
      <el-container class="layout-body">
        <el-aside style="background-color:#1c1b1b">
          <el-row>
            <el-col :span="12">
              <el-menu
                  :router="true"
                  style="width: 300px;"
                  :default-active="this.$router.currentRoute.path"
                  class="el-menu-vertical-demo"
                  @open="handleOpen"
                  @close="handleClose"
                  background-color="#1c1b1b"
                  text-color="#fff"
                  active-text-color="#ffd04b">
                <h1 style="color:white;text-align: center;font-size: 20px;margin-top:20px">首页</h1>
                <el-divider></el-divider>
                <el-submenu index="/sys-admin/index">
                  <template slot="title">
                    <i class="el-icon-goods"></i>
                    <span slot="title">客房管理</span>
                  </template>
                  <el-menu-item-group>
                    <el-menu-item index="/sys-admin/product/room-particulars">
                      <i class="el-icon-menu"></i>客房详情
                    </el-menu-item>
                    <el-menu-item index="/sys-admin/product/room-modification">
                      <i class="el-icon-menu"></i>修改客房
                    </el-menu-item>
                  </el-menu-item-group>
                </el-submenu>

                <el-submenu index="2">
                  <template slot="title">
                    <i class="el-icon-goods"></i>
                    <span slot="title">住户管理</span>
                  </template>
                  <el-menu-item-group>
                    <el-menu-item index="/sys-admin/product/client-list">
                      <i class="el-icon-menu"></i>住户列表
                    </el-menu-item>
                  </el-menu-item-group>
                </el-submenu>

                <el-submenu index="3">
                  <template slot="title">
                    <i class="el-icon-goods"></i>
                    <span slot="title">管理员管理</span>
                  </template>
                  <el-menu-item index="/sys-admin/product/admin-management">
                    <i class="el-icon-menu"></i>管理员列表
                  </el-menu-item>
                </el-submenu>

                <el-submenu index="4">
                  <template slot="title">
                    <i class="el-icon-goods"></i>
                    <span slot="title">订单管理</span>
                  </template>
                  <el-menu-item-group>
                    <el-menu-item index="/sys-admin/product/history-order-management">
                      <i class="el-icon-menu"></i>历史订单列表
                    </el-menu-item>
                    <el-menu-item index="/sys-admin/product/subscribe-order-management">
                      <i class="el-icon-menu"></i>预约订单列表
                    </el-menu-item>
                  </el-menu-item-group>
                </el-submenu>

              </el-menu>
            </el-col>
          </el-row>
        </el-aside>
        <el-main>

          <router-view/>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },

  }
}
</script>
<style>
* {
  margin: 0;
}

.layout-body {
  position: absolute;
  top: 60px;
  bottom: 0;
  right: 0;
  left: 0;
}

.layout-header {
  background-color: #1c1b1b;
}

.el-menu-vertical-demo {
  border-right: none !important;
}
</style>